package com.expoente.model.dao;

import java.util.List;

import android.database.Cursor;
import android.database.SQLException;

import com.expoente.model.Line;
import com.expoente.model.LineInformation;
import com.expoente.model.Place;
import com.expoente.model.Route;
import com.expoente.model.dao.impl.DBAdapterImpl;

public interface DBAdapterDAO {

	public DBAdapterImpl open();

	public void close();

	public long insertLine(String name, double cost);

	public long insertPlace(String address);

	public long insertRoute(int id_line, int id_place, int _order);

	public Cursor getLineByID(long rowID) throws SQLException;

	public Cursor getAllLines() throws SQLException;

	public Place getPlaceByID(long rowID) throws SQLException;

	public Cursor getRoutesByLineID(long lineID) throws SQLException;

	public LineInformation getLineInformation(long lineID) throws SQLException;

	public void resetDatabase(List<Line> lines, List<Place> places,
			List<Route> routes);

	public void createLines(List<Line> lines);

	public void createPlaces(List<Place> places);

	public void createRoutes(List<Route> routes);

	public List<LineInformation> getAllLinesInformation() throws SQLException;
}
